package com.duxiaolie.demobook.web.queue;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: WeiYingYu
 * Description: 消息队列-消息监听者、消息消费者
 * <p>File Created at 2020/10/20</p>
 */
@RestController
public class CustomerController {
    /**
     * 监听和读取消息
     *
     * @param queue
     */
    @JmsListener(destination = "active.queue")
    public void readActiveQueue(String queue) {
        System.out.println("接收到:" + queue);
    }
}
